package cn.myjerry.iterator;

public class Client {
	public static void main(String[] args) {
		ConcreteMyAggregate cma = new ConcreteMyAggregate();
		cma.addObject("aaa");
		cma.addObject("bbb");
		cma.addObject("ccc");
		cma.addObject("ddd");
		
		MyIterator it = cma.createIterator();
		
		while(it.hasNext()) {
			System.out.println(it.getCurrentObj());
			it.next();
		}
	}
}
